<?php
$this->Html->css('chat', null, array('inline' => false));
$this->Html->script('chat', array('inline' => false));
?>
<h1>STUDENT NETWORK</h1>

<div id="page-wrap">

	<div> 
		<h1>There is an extra div for nav</h1>
		<input type="button" value="Home" />
		<input type="button" value="Profile" />
	</div>
	
	<div id="online-area" >
	
		<?php
		echo "<br />" . "Today is: ";
		echo date("Y.m.d") . "<br />";
		echo "People online:" . "<br />";
		?>
		
		<div>
			<table>

			<?php foreach ($users as $user): ?>	
				<tr>
					<td>		
						<?php ){
								echo '<a href="javascript:void(0)" onclick="chatWith(\''.$user['name'].'\', \''.$user['id_user'].'\')">'.$user['name'].' '.$user['surname'].'</a>';
								echo $this -> Html -> link($this -> Html -> image("admin/edit.png", array("alt" => "chat")), array('action' => 'chat'), array('escape' => false));
						?>
					</td>
				</tr>
			<?php endforeach; ?>
			
			</table>
		</div>
		
	</div>

	<div id="chat-wrap">
		<div id="chat-area"></div>
	
		<form id="send-message-area">
			<p>Your message: </p>
			<!--<textarea id="sendie" maxlength = '100' ></textarea>-->
		</form>
			<?php //print_r($this->Session->read('Auth.User')); ?>
	</div>
</div>
